# $Id: PKGBUILD 81039 2012-12-10 20:07:49Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Chris Baker <baker.chris.3@gmail.com>

pkgname=python2-nltk
pkgver=2.0.4
pkgrel=1
pkgdesc='Natural language processing in Python'
arch=('any')
url='http://www.nltk.org/'
license=('APACHE')
depends=('python2-yaml')
optdepends=('nltk-data: test data'
            'python2-numpy: used for calculations'
            'python2-matplotlib: used for plotting')
replaces=('python-nltk')
provides=('python-nltk')
source=("http://pypi.python.org/packages/source/n/nltk/nltk-${pkgver}.tar.gz")
sha256sums=('a554d6b9c5c7c8b597a090d8848a6f78c6fc4665ae43c9a6a6d6a5b207d98c65')

build() {
  cd nltk-$pkgver

  # python 2 fix
  find . -type f -exec sed -i 's:^#.*env python:#!/usr/bin/env python2:' {} +
  python2 setup.py build
}

package() {
  cd nltk-$pkgver

  python2 setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
